<?php $this->load->view('admin/common/pageHead');?>
<?php $this->load->view('admin/common/pageHeader');?>

<div class="fLeft">
	<?php $this->load->view('admin/common/left_nav'); ?>
</div>

<table
	style="border-color: #EAC8B3; border-left: 1px solid #EAC8B3; border-right: 1px solid #EAC8B3; border-style: solid; border-width: 1px;"
	align="center">



	<tbody>
		<tr>
			<td colspan="3" class="fotter-color" align="center"><b>Add Theme</b>
			</td>
		</tr>
		<tr>
			<td colspan="3" class="style2" align="left">
				<form name="form1" action="/addNewMedium" method="post"
					onSubmit="return addCategory();">
					<table border="0" cellpadding="0" cellspacing="0" height="25"
						width="400" align="center">
						<tbody>
							<tr>
								<td>Select Category</td>
								<td><select name="categoryID" id="categoryID"
									onchange="chooseTheme()">
										<option value="">Please Select</option>
										<?php foreach ($category as $temp => $admin){?>
										<option value=<?php echo $admin['cat_id'];?>>
											<?php  echo $admin['name'];?>
										</option>
										<?php }?>

								</select></td>
							</tr>
							<tr>
								<td>Select Theme</td>
								<td>
									<div id="themeDiv">
										<select name="themeID" id="themeID">
											<option value="">Please Select</option>
										</select>
									</div>
								</td>
							</tr>


							<tr>
								<td class="tdclass" width="150" style="font-size: 16px;">Medium
									Name:<span
									style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;">*</span>
								</td>
								<td><input name="mediumName" class="form_input" id="mediumName"
									value="" type="text"></td>
							</tr>
							<tr>
								<td class="tdclass" colspan="2" width="150"></td>
							</tr>

							<tr>
								<td class="tdclass" colspan="2" width="150"></td>
							</tr>




							<tr>
								<td class="tdclass" colspan="2" width="150"></td>
							</tr>

							<tr>
							</tr>
							<tr>
								<td colspan="10" height="58" align="center"><input name="update"
									class="form_input" id="update" value="ADD" type="submit">&nbsp;<input
									value="Cancel" class="" onclick="javascript:history.back();"
									type="reset">
								</td>
							</tr>
						</tbody>
					</table>

				</form>
			</td>
		</tr>
	</tbody>
</table>
<script type="text/javascript">
	function addCategory()
	{
		if(document.form1.categoryID.value=="")
		{
		alert('Please Select A Category!');
		document.form1.categoryID.focus();
		return false;
		}
		if(document.form1.themeID.value=="")
		{
		alert('Please Select A Theme Name!');
		document.form1.themeID.focus();
		return false;
		}
		
	if(document.form1.mediumName.value=='')
	{
	alert("Please Add a medium name ");
	document.form1.mediumName.focus();
	return false;
	}
	}
</script>
<?php
// var_dump($category);
?>
